using MaterialUI;
using UnityEngine;

public class Example07LengthValidation : MonoBehaviour, ITextValidator
{
	private MaterialInputField m_MaterialInputField;

	public void Init(MaterialInputField materialInputField)
	{
		m_MaterialInputField = materialInputField;
	}

	public bool IsTextValid()
	{
		if (m_MaterialInputField.inputField.text.Length <= 10)
		{
			return true;
		}
		m_MaterialInputField.validationText.text = "Must be at most 10 characters";
		return false;
	}
}
